import request from '@/plugin/axios'
import util from '@/libs/util.js'
export function getDetailUserInfo (id) {
    let data = {};

    data.Id = id
    data.UserId = util.cookies.get('uuid')
    return request({
        url: '/User/Detail',
        method: 'post',
        data
    })
}

export function getParentName (id) {
    let data = {};

    data.Id = id
    data.UserId = util.cookies.get('uuid')
    return request({
        url: '/User/Parent',
        method: 'post',
        data
    })
}
export function getRoleList (id) {
    let data = {};

    data.pageno = 1
    data.pagesize = 1000
    data.UserId = util.cookies.get('uuid')
    return request({
        url: '/Role/List',
        method: 'post',
        data
    })
}
export function updateUser (data) {



    data.UserId = util.cookies.get('uuid')
    return request({
        url: '/User/Update',
        method: 'post',
        data
    })
}

export function deleteUser(id){
    let data = {Id:id};
    return request({
        url: '/User/Delete',
        method: 'post',
        data
    });
}

export function getCompanyList() {
    let data = {};
    data.UserId = util.cookies.get('uuid')
    return request({
        url:'/Company/List',
        method:'post',
        data
    })
}
export function AddChildUser(data) {
    data.UserId = util.cookies.get('uuid')
    return request({
        url:'/User/Add',
        method:'post',
        data
    })
}

export function BindUser(data) {


    return request({
        url:'/Role/BindUser',
        method:'post',
        data
    })
}
